package com.atguigu.boot3.ssm.mapper;

import com.atguigu.boot3.ssm.bean.People;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface PeopleMapper {
    //mybatis注解,向people表插入数据.people表含有字段id已在mysql内设置自增
    @Insert({"INSERT INTO people(name,pwd) values(#{name},#{pwd})"})
    void generatePeopleValue(String name,String pwd);

    //mybatis注解,从People表获取所有字段
    @Select({"SELECT * FROM people"})
    List<People> getAllPeopleValue();

    //mybatis xml,详见PeopleMapper.xml
    void ModifyAllPwd2Nul();

    //mybatis xml,详见PeopleMapper.xml
    void DestoryAllValue();
}
